package net.xmat.webtest.web.controller;


import java.util.List;

import net.xmat.webtest.beans.Book;
import net.xmat.webtest.dao.IBookDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/books")
public class BooksController {

	@Autowired
	private IBookDao bookDao;
	
	@RequestMapping(value="/list", method = RequestMethod.GET)
	public List<Book> list(String name) {
		List<Book> books = bookDao.list(name);
		return books;
	}

	@RequestMapping(value="/save", method = RequestMethod.POST)	
	public void add() {
		
	}
	
	@RequestMapping(value="/load", method = RequestMethod.GET)	
	public void load() {
		
	}
	
	
}
